home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 April / Chip CMCD0400.iso / SOFTWARE / Demo / InfoPulse / GateKeeper / gk3full.exe / data1.cab / ConfigSite_Files / logging / showlog.agp < prev   
Encoding:
Text File  |  1999-06-17  |  9.4 KB  |  377 lines

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  4. <meta NAME="Author,Design" Content="GateKeeper Team; gatekeeper@infopulse.net">
  5. <meta NAME="Copyright" Content="Infopulse; www.infopulse.net">
  6. <title>Empty</title>
  7. </head>
  8.  
  9. <body>
  10. <%
  11.     file = Request.ReqParam("file")
  12.     y = Mid( file, 3, 4 )
  13.     m = Mid( file, 7, 2 )
  14.     d = Mid( file, 9, 2 )
  15.     Dat = DateSerial( y, m, d)
  16.     fName = FormatDateTime( Dat, 1 )
  17.  
  18.     client = Request.ReqParam("client")
  19.     reqType = Request.ReqParam("reqType")
  20.     host = Request.ReqParam("host")
  21.     sAudit = Request.ReqParam("audit")
  22.     if sAudit = "True" Then
  23.         audit = True
  24.     Else
  25.         audit = False
  26.     End if
  27.  
  28.     Logging.File=file
  29.     Logging.SetSearchParams client, reqType, host, audit
  30.     Logging.ParseLog
  31. %>
  32. <center>
  33. <p><big><strong><font face="Arial">Logging of <%Response.Write(fName)%></font></strong></big></p>
  34. <p><big><strong><font face="Arial"><%Response.Write(client)%></font></strong></big></p>
  35. <p><big><strong><font face="Arial"><%Response.Write(reqType)%></font></strong></big></p>
  36. <p><big><strong><font face="Arial"><%Response.Write(host)%></font></strong></big></p>
  37. </center>
  38. <hr>
  39. <%
  40.    total = Logging.GetTotalDownload()
  41.    Sub PutBar( dwnLoad )
  42.     if dwnLoad > 0 Then
  43.         percent = ((dwnLoad * 100)/total)
  44.     Else
  45.         percent = 0
  46.     End If
  47.     if percent > 90 Then
  48.        line = "<img src=""images/yellow.gif"" height=200 width=15 border=0>"
  49.        Response.Write(line)
  50.        Exit Sub
  51.     End if
  52.     if percent > 80 Then
  53.        line = "<img src=""images/ltgreen.gif"" height=180 width=15 border=0>"
  54.        Response.Write(line)
  55.        Exit Sub
  56.     End if
  57.     if percent > 70 Then
  58.        line = "<img src=""images/green.gif"" height=160 width=15 border=0>"
  59.        Response.Write(line)
  60.        Exit Sub
  61.     End if
  62.     if percent > 60 Then
  63.        line = "<img src=""images/purple.gif"" height=140 width=15 border=0>"
  64.        Response.Write(line)
  65.        Exit Sub
  66.     End if
  67.     if percent > 50 Then
  68.        line = "<img src=""images/pink.gif"" height=120 width=15 border=0>"
  69.        Response.Write(line)
  70.        Exit Sub
  71.     End if
  72.     if percent > 40 Then
  73.        line = "<img src=""images/red.gif"" height=100 width=15 border=0>"
  74.        Response.Write(line)
  75.        Exit Sub
  76.     End if
  77.     if percent > 30 Then
  78.        line = "<img src=""images/orange.gif"" height=80 width=15 border=0>"
  79.        Response.Write(line)
  80.        Exit Sub
  81.     End if
  82.     if percent > 20 Then
  83.        line = "<img src=""images/brown.gif"" height=50 width=15 border=0>"
  84.        Response.Write(line)
  85.        Exit Sub
  86.     End if
  87.     if percent > 10 Then
  88.        line = "<img src=""images/cyan.gif"" height=30 width=15 border=0>"
  89.        Response.Write(line)
  90.        Exit Sub
  91.     End if
  92.     if percent > 0 Then
  93.        line = "<img src=""images/blue.gif"" height=5 width=15 border=0>"
  94.        Response.Write(line)
  95.        Exit Sub
  96.     End If
  97.     line = "<img src=""images/clear.gif"" height=1 width=15 border=0>"
  98.     Response.Write(line)
  99.    End Sub
  100. %>
  101.  
  102. <br>
  103. <div align="center"><center>
  104. <table border="1" cellpadding="0" cellspacing="0" width="100%">
  105.     <tr>
  106.         <td width="80%" align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  107.             Access statistics(<%Response.Write(Logging.GetTotalHits())%> hits, <%Response.Write(Logging.GetTotalDownloadSz())%> download)
  108.         </font></strong></td>
  109.         <td width="20%" align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  110.             Legend
  111.         </font></strong></td>
  112.     </tr>
  113.     <tr>
  114.         <td align=center width="80%">
  115.             <img src="images/ruler_ver.gif" height=200 width=16 border=0>
  116. <%
  117.             for i = 0 to 23
  118.                 tmp = Logging.GetDownloadForHour(i)
  119.                 PutBar( tmp )
  120.             next
  121. %>
  122.             <br>
  123.             <img src="images/ruler_hor.gif" height=20 width=382 border=0>
  124.         </td>
  125.         <td align="center" width="20%">
  126.         <table  border="1" cellpadding="0" cellspacing="0" width="100%">
  127.             <tr>
  128.                 <td align="center">
  129.                     <font face="Arial">
  130.                     <img src="images/yellow.gif" height=18 width=15 border=0>
  131.                       > 90%
  132.                     </font>
  133.                 </td>
  134.             </tr>
  135.             <tr>
  136.                 <td align="center">
  137.                     <font face="Arial">
  138.                     <img src="images/ltgreen.gif" height=18 width=15 border=0>
  139.                       > 80%
  140.                     </font>
  141.                 </td>
  142.             </tr>
  143.             <tr>
  144.                 <td align="center">
  145.                     <font face="Arial">
  146.                     <img src="images/green.gif" height=18 width=15 border=0>
  147.                       > 70%
  148.                     </font>
  149.                 </td>
  150.             </tr>
  151.             <tr>
  152.                 <td align="center">
  153.                     <font face="Arial">
  154.                     <img src="images/purple.gif" height=18 width=15 border=0>
  155.                       > 60%
  156.                     </font>
  157.                 </td>
  158.             </tr>
  159.             <tr>
  160.                 <td align="center">
  161.                     <font face="Arial">
  162.                     <img src="images/pink.gif" height=18 width=15 border=0>
  163.                       > 50%
  164.                     </font>
  165.                 </td>
  166.             </tr>
  167.             <tr>
  168.                 <td align="center">
  169.                     <font face="Arial">
  170.                     <img src="images/red.gif" height=18 width=15 border=0>
  171.                       > 40%
  172.                     </font>
  173.                 </td>
  174.             </tr>
  175.             <tr>
  176.                 <td align="center">
  177.                     <font face="Arial">
  178.                     <img src="images/orange.gif" height=18 width=15 border=0>
  179.                       > 30%
  180.                     </font>
  181.                 </td>
  182.             </tr>
  183.             <tr>
  184.                 <td align="center">
  185.                     <font face="Arial">
  186.                     <img src="images/brown.gif" height=18 width=15 border=0>
  187.                       > 20%
  188.                     </font>
  189.                 </td>
  190.             </tr>
  191.             <tr>
  192.                 <td align="center">
  193.                     <font face="Arial">
  194.                     <img src="images/cyan.gif" height=18 width=15 border=0>
  195.                       > 10%
  196.                     </font>
  197.                 </td>
  198.             </tr>
  199.             <tr>
  200.                 <td align="center">
  201.                     <font face="Arial">
  202.                     <img src="images/blue.gif" height=18 width=15 border=0>
  203.                       >   0%
  204.                     </font>
  205.                 </td>
  206.             </tr>
  207.         </table>
  208.          </td>
  209.     </tr>
  210. </table>
  211. </center></div>
  212. <br>
  213. <hr>
  214. <%
  215.    if Len(client) = 0 Then
  216. %>
  217. <br>
  218. <center><strong><font face="Arial">Clients</font></strong></center>
  219. <br><br>
  220. <div align="center"><center>
  221. <table border="1" cellpadding="0" cellspacing="0" width="50%">
  222.     <tr>
  223.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  224.             Client
  225.         </font></strong></td>
  226.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  227.             Hits
  228.         </font></strong></td>
  229.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  230.             Download
  231.         </font></strong></td>
  232.     </tr>
  233. <%
  234.     Response.Write(Logging.Clients(file))
  235. %>
  236. </table>
  237. </center></div>
  238. <br>
  239. <hr>
  240. <%
  241.    End if ' if Len(client) = 0 ...
  242.    if Len(reqType) = 0 Then
  243. %>
  244. <br>
  245. <center><strong><font face="Arial">Request types</font></strong></center>
  246. <br><br>
  247. <div align="center"><center>
  248. <table border="1" cellpadding="0" cellspacing="0" width="50%">
  249.     <tr>
  250.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  251.             Request type
  252.         </font></strong></td>
  253.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  254.             Hits
  255.         </font></strong></td>
  256.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  257.             Download
  258.         </font></strong></td>
  259.     </tr>
  260. <%
  261.     for i = 1 to Logging.CountReqTypes
  262.         Logging.GetReqTypeParams i,sTmpName,nTmpHits,sTmpDownload
  263. %>
  264.     <tr>
  265. <%
  266.         link = "showlog.agp?file=" & file & "&audit=" & sAudit & "&reqType=" & sTmpName
  267.         if Len(client) > 0 Then
  268.             link = link & "&client=" & client
  269.         End if
  270.         if Len(host) > 0 Then
  271.             link = link & "&host=" & host
  272.         End if
  273. %>
  274.         <td align="center"><font face="Arial">
  275.             <A HREF="<%Response.Write(link)%>"><%Response.Write(sTmpName)%></A>
  276.         </font></td>
  277.         <td align="right"><font face="Arial">
  278.             <%Response.Write(nTmpHits)%>
  279.         </font></td>
  280.         <td align="right"><font face="Arial">
  281.             <%Response.Write(sTmpDownload)%>
  282.         </font></td>
  283.     </tr>
  284. <%
  285.     next
  286. %>
  287. </table>
  288. </center></div>
  289. <br>
  290. <hr>
  291. <%
  292.    End if 'if Len(reqType) = 0 ...
  293.    if Len(host) = 0 Then
  294. %>
  295. <br>
  296. <center><strong><font face="Arial">Contacted hosts</font></strong></center>
  297. <br><br>
  298. <div align="center"><center>
  299. <table border="1" cellpadding="0" cellspacing="0" width="50%">
  300.     <tr>
  301.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  302.             Host
  303.         </font></strong></td>
  304.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  305.             Hits
  306.         </font></strong></td>
  307.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  308.             Download
  309.         </font></strong></td>
  310.     </tr>
  311. <%
  312.     Response.Write(Logging.Hosts(file))
  313. %>
  314.  
  315. </table>
  316. </center></div>
  317. <br>
  318. <hr>
  319. <br>
  320. <%
  321.    End if 'if Len(host) = 0 ...
  322.    nr = 0
  323.    if Len(client) > 0 Then
  324.     nr = nr + 1
  325.    End if
  326.    if Len(reqType) > 0 Then
  327.     nr = nr + 1
  328.    End if
  329.    if Len(host) > 0 Then
  330.     nr = nr + 1
  331.    End if
  332.    if (nr > 0) Then
  333. %>
  334.  
  335. <%
  336.     if Len(host)>0 Then
  337. %>
  338. <div align="center"><center>
  339. <table border="1" cellpadding="0" cellspacing="0" width="100%">
  340.     <tr>
  341.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  342.             Time
  343.         </font></strong></td>
  344.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  345.             Received
  346.         </font></strong></td>
  347.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  348.             Contacted host
  349.         </font></strong></td>
  350.         <td align="center" bgcolor="#183159"><strong><font face="Arial" color="#FFFFFF">
  351.             Requested URL
  352.         </font></strong></td>
  353.     </tr>
  354. <%
  355.         Response.Write(Logging.FullHostURLs)
  356. %>
  357. </table>
  358. </center></div>
  359. <br>
  360. <hr>
  361. <%
  362.     End If
  363. %>
  364.  
  365. <%
  366.    End if 'if Len(host) = 0 ...
  367. %>
  368. <br>
  369. <%
  370.     'Remove all elements from lists (free up memory)
  371.     Logging.File = ""
  372. %>
  373. <font size="1" face="Arial"><%Response.Write(GateKeeper.Version)%></font>
  374.  
  375. </body>
  376. </html>
  377.